﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using KnowWare.Model;
using System.IO;

namespace KnowWareBeta
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            SplashScreen sp = new SplashScreen("SplashScreen1.jpg");
            sp.Show(false, true);
            System.Threading.Thread.Sleep(1000);
            sp.Close(new TimeSpan(0));

            InitializeComponent();
        }

        private void btn_nytEvent_Click(object sender, RoutedEventArgs e)
        {
            IndlæsWindow iw = new IndlæsWindow(this);
            if (iw.ShowDialog() == true)
            {
                this.Close();
            }
        }

        private void button3_Click(object sender, RoutedEventArgs e)
        {
            Event nytEvent = new Event("Evt", new DateTime(2012, 11, 11), Directory.GetCurrentDirectory() + "../../../../KnowWare/Book.csv", Directory.GetCurrentDirectory() + "../../../../KnowWare/Kategorier.csv");
            new HovedWindow(nytEvent).Show();
            this.Close();
        }
    }
}
